A simple transformation of three.js for use within a Deno workflow

A simple transformation of three.js for use within a Deno workflow

threejs_4_deno .A simple transformation of three.js for use within a Deno workflow

three.js 4 deno

Manage your external dependencies with care.

// deps.ts
import { WebGLRenderer } from "https://deno.land/x/[email protected]/src/Three.js"
import { OrbitalControls } from "https://deno.land/x/[email protected]/examples/jsm/controls/OrbitControls.js"

// main.ts
import { WebGLRenderer } from "deps.ts"
//use as per normal

To see your code in action in the browser:

  • compile your typescript into javascript
  • update any urls as neccessary (.ts -> .js)
  • include your main.js script within your html
<script type="module" src="main.js"></script>

The following tsconfig.json may come in handy:

// tsconfig.json
{
  "compilerOptions": {
    "allowJs": true,
    "lib": ["ESNext"],
  }
}

Your more than welcome to use the main.ts script to create your own version or tweek the way I've done it. Let me know if you run into any issues or open a PR if you see some possible improvements :)

Download Details:

Author: DefinitelyMaybe

Source Code: https://github.com/DefinitelyMaybe/threejs_4_deno

deno node nodejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

AEM Querybuilder for JavaScript (Browser, Node, Deno)

Helix Querybuilder .AEM Querybuilder for JavaScript (Browser, Node, Deno)

NKeys for JavaScript - Node.js, Browsers, and Deno

A public-key signature system based on Ed25519 for the NATS ecosystem system for JavaScript. The nkeys.js library works in Deno, Node.js, and the browser!

Javascript module for easily generating mazes,compatible with both Deno and Node

A work-in-progress Javascript maze generator module, compatible with both Deno and Node.

Deno Tutorial for Beginners: Deno vs. Node: Better Than NodeJS?

Deno is released, it’s time to find out if it can prove a worthy competition for Node.js. What is Deno? Why Deno can be considered an alternative to Node? The main differences between Deno and Node. Write a simple Deno app.

What is Deno? The Node.JS Killer? The Deno-minator to Node?

What is Deno? The Node.JS Killer? The Deno-minator to Node? Deno is the new hype and will it be better than node.js? Deno is a secure runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language that addresses Node’s shortcomings