kopia lustrzana https://github.com/backface/turtlestitch
change link
rodzic
3187cf99fe
commit
86c36be34c
|
@ -37,13 +37,13 @@
|
|||
<!-- turtlestitch additions -->
|
||||
<script type="text/javascript" src="stitchcode/turtleShepherd.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/morphic.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/symbols.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/symbols.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/blocks.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/threads.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/objects.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/turtlecloud.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/gui.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/store.js"></script>
|
||||
<script type="text/javascript" src="stitchcode/store.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var world;
|
||||
|
|
|
@ -2148,7 +2148,7 @@ IDE_Morph.prototype.snapMenu = function () {
|
|||
menu.addItem(
|
||||
'TurtleStitch Web Site',
|
||||
function () {
|
||||
window.open('http://www.turtlestitch.com', 'TurtleStitchWebsite');
|
||||
window.open('http://www.turtlestitch.org', 'TurtleStitchWebsite');
|
||||
}
|
||||
);
|
||||
menu.addItem(
|
||||
|
|
|
@ -1338,6 +1338,7 @@ SpriteMorph.prototype.resetAll = function () {
|
|||
myself.gotoXY(0,0);
|
||||
myself.setHeading(90);
|
||||
myself.clear();
|
||||
myself.rerender();
|
||||
myself.isDown = true;
|
||||
}
|
||||
|
||||
|
@ -2704,25 +2705,24 @@ StageMorph.prototype.initCamera = function () {
|
|||
|
||||
myself.camera.fitScene = function () {
|
||||
|
||||
var boundingBox = new THREE.Box3().setFromObject(myself.myStitchLines),
|
||||
boundingSphere = boundingBox.getBoundingSphere(new THREE.Vector3()), // center with new vector
|
||||
center = boundingSphere.center,
|
||||
distance = boundingSphere.radius;
|
||||
|
||||
var boundingBox = new THREE.Box3().setFromObject(myself.myStitchLines),
|
||||
boundingSphere = boundingBox.getBoundingSphere(),
|
||||
center = boundingSphere.center,
|
||||
distance = boundingSphere.radius;
|
||||
|
||||
if(distance > 0) {
|
||||
var width = Math.max(myself.width(), 480),
|
||||
if(distance > 0) {
|
||||
var width = Math.max(myself.width(), 480),
|
||||
height = Math.max(myself.height(), 360);
|
||||
|
||||
this.zoomFactor = Math.max(width / distance, height / distance) * 0.90;
|
||||
this.applyZoom();
|
||||
this.zoomFactor = Math.max(width / distance, height / distance) * 0.90;
|
||||
this.applyZoom();
|
||||
|
||||
this.position.set(center.x, center.y, 10);
|
||||
myself.controls.center.set(center.x, center.y, 10);
|
||||
this.position.set(center.x, center.y, 10);
|
||||
myself.controls.center.set(center.x, center.y, 10);
|
||||
|
||||
myself.controls.update();
|
||||
myself.reRender();
|
||||
}
|
||||
myself.controls.update();
|
||||
myself.reRender();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2741,7 +2741,7 @@ StageMorph.prototype.initTurtle = function() {
|
|||
|
||||
var loader = new THREE.LegacyJSONLoader();
|
||||
|
||||
loader.load( 'stitchcode/assets/turtle.js',
|
||||
loader.load('stitchcode/assets/turtle.js',
|
||||
function ( geometry, materials ) {
|
||||
//var material = materials[ 0 ];
|
||||
this.turtle = new THREE.Mesh(geometry,material);
|
||||
|
|
Ładowanie…
Reference in New Issue