init repository with p5js and babylon
This commit is contained in:
16
src/multi_sketch.js
Normal file
16
src/multi_sketch.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as BABYLON from "babylonjs";
|
||||
|
||||
const canvas = document.getElementById("renderCanvas");
|
||||
const engine = new BABYLON.Engine(canvas, true);
|
||||
|
||||
const scene = new BABYLON.Scene(engine);
|
||||
const camera = new BABYLON.ArcRotateCamera("cam", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
|
||||
camera.attachControl(canvas, true);
|
||||
|
||||
const light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
|
||||
|
||||
const sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {}, scene);
|
||||
|
||||
engine.runRenderLoop(() => {
|
||||
scene.render();
|
||||
});
|
||||
Reference in New Issue
Block a user