Skip to content

Commit 332ebf4

Browse files
author
Spongman
committed
loadModel in preload(), add instructions
1 parent f44a4f3 commit 332ebf4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

test/manual-test-examples/webgl/material/perPixelLighting/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</style>
1313
</head>
1414
<body>
15+
<p style="position: absolute; width:300px; left:50%; margin-left: -150px; color:white; text-align: center;">Press mouse to enable per-pixel-lighting</p>
1516
<script>
1617
(function(){var script=document.createElement('script');script.onload=function(){var stats=new Stats();stats.domElement.style.cssText='position:fixed;left:0;top:0;z-index:10000';document.body.appendChild(stats.domElement);requestAnimationFrame(function loop(){stats.update();requestAnimationFrame(loop)});};script.src='http://rawgit.com/mrdoob/stats.js/master/build/stats.min.js';document.head.appendChild(script);})()
1718
</script>

test/manual-test-examples/webgl/material/perPixelLighting/sketch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
var teapot;
22

3+
function preload() {
4+
teapot = loadModel('../wireframe/assets/teapot.obj', true);
5+
}
6+
37
function setup() {
48
createCanvas(windowWidth, windowHeight, WEBGL);
5-
teapot = loadModel('../wireframe/assets/teapot.obj', true);
69
noStroke();
710
}
811

test/manual-test-examples/webgl/material/wireframe/sketch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
var teapot;
77

8+
function preload() {
9+
teapot = loadModel('../wireframe/assets/teapot.obj', true);
10+
}
11+
812
function setup() {
913
createCanvas(windowWidth, windowHeight, WEBGL);
10-
teapot = loadModel('assets/teapot.obj', true);
1114
}
1215

1316

0 commit comments

Comments
 (0)