This document provides an introduction to creating 3D scenes using the three.js library. It discusses the key components of a 3D scene: the light source, camera, and renderer. Common light sources like ambient, point, and directional lights are described. Perspective and orthographic cameras are covered. The renderer draws the scene. Examples are provided for setting up a basic scene with these components and adding objects, animating objects, selecting objects using raycasting, and controlling the camera. Advantages of 3D web development using three.js include being browser-based and able to integrate with other web technologies.
Three.js is a popular JavaScript library that makes it easier to use WebGL by abstracting away its complexity. It represents 3D objects, cameras, lights and materials as JavaScript objects that can be easily manipulated to build 3D scenes. Basic components of a Three.js scene include a camera, lights, 3D meshes to represent objects, and materials applied to meshes. Common tasks like creating a renderer, camera, scene, adding objects and lights, and implementing an animation loop are demonstrated.
This document provides an overview of the Three.js library for creating 3D graphics in web browsers using WebGL. It discusses key Three.js concepts like scenes, cameras, lights, materials, and textures. It also provides examples of how to load 3D models and textures, set up animations, and add interactivity using controls. Useful links are included for learning more about Three.js and WebGL fundamentals.
WebGL allows for 3D graphics rendering within web browsers using JavaScript and standard web technologies. It provides an API for accessing a computer's GPU similarly to Canvas for 2D drawing. THREE.js makes WebGL programming easier by abstracting away complexities like shader programming and matrix computations. A simple example creates a 3D cube in THREE.js with just a few lines of code versus the longer WebGL example. THREE.js provides high-level objects for cameras, lights, materials and more to build 3D scenes efficiently in the browser.
Three.js is a powerful JavaScript library for creating 3D graphics in a web browser using WebGL. It allows placing 3D objects into a scene, defining a camera to view the scene, adding lighting, and rendering the 3D graphics. The basics of three.js include setting up a scene, camera, lights, geometry for 3D objects, materials, and a renderer. Examples are provided of what can be created with three.js like animated 3D graphics and a preview of a simple rolling ball demo.
Le document présente le design pattern Adaptateur, qui permet de convertir l'interface d'une classe pour la rendre compatible avec une autre, facilitant ainsi l'interaction entre classes avec des interfaces incompatibles. Il décrit également les différentes classes impliquées dans l'implémentation de ce pattern, y compris les adaptations par héritage et par composition. Enfin, un exemple de code illustrant l'utilisation de ce pattern dans une application est fourni.
NDC Python 게임서버 안녕하십니까? : 몬스터 슈퍼리그 게임 서버 편의 후속으로 기획된 발표입니다. 사내 준비 도중 "너굴" 님의 질문에서 시작되었습니다.
이 발표는 잘 알려진 RPC Framework 인 Thrift, gRPC를 살펴보고 예시로 오델로 게임을 만들어보면서 기존 RPC framework 들이 게임의 서버/클라 구조에 잘 어울리지는 살펴보고 왜 몬스터 슈퍼리그에서 그런 선택을 했는지 살펴봅니다.
그리고 게임에 맞게 RPC 를 설계하고 이를 이용하여 온라인 오델로 게임을 완성해봅니다.
This document discusses Angular directives, including built-in and custom directives. It describes the three types of built-in directives - component directives, structural directives, and attribute directives. It provides examples of common built-in directives like ngIf, ngFor, ngSwitch, ngModel, ngStyle, and ngClass. It also explains how to create a custom attribute directive to dynamically style an element.
1) The document discusses 30 important interview questions about virtualization and VMware. It covers topics like the VMware kernel, ESX server networking, vMotion, snapshots, port groups, cloning templates, and more.
2) Each question is accompanied by an answer that provides details about the topic. For example, it explains that the VMware kernel is proprietary and works with the service console, while port groups separate network traffic types.
3) Common virtualization challenges and their solutions are also addressed, such as issues taking snapshots of VMs configured with physical LUN mappings that need to be changed to virtual first.
Node.js is a server-side JavaScript framework created by Ryan Dahl in 2009, utilizing Google's V8 engine for event-driven, non-blocking I/O, which facilitates scalable application development. The document discusses Node.js benefits, setup procedures, including installation methods like precompiled binaries and version managers, as well as basic commands for managing Node.js and npm (Node Package Manager), which comes bundled with Node.js. Key features highlighted include the ability to use the same language for both frontend and backend development and the ease of building real-time applications.
Le document présente différentes architectures de systèmes logiciels, notamment les architectures client/serveur, n-tiers et peer-to-peer (P2P), en expliquant leurs structures, avantages et inconvénients. Il aborde l'évolution de la technologie P2P, des logiciels comme Napster, Kazaa, eDonkey et BitTorrent, ainsi que les enjeux juridiques et culturels liés au partage de fichiers sur Internet. Enfin, le document examine le concept de grid computing pour une meilleure virtualisation des ressources informatiques.
Le document aborde la virtualisation en tant que technologie optimisant l'utilisation des ressources informatiques, réduisant les coûts, et améliorant la flexibilité et la sécurité des infrastructures. Il explore divers types de virtualisation, y compris la virtualisation complète, para-virtualisation et les isolateurs, ainsi que leurs applications dans les serveurs, le stockage et les réseaux. Les avantages incluent la réduction des coûts, la simplification de l'administration et l'amélioration de la qualité de service.
Express is a web framework for Node.js that allows routing, middleware, templating and more. It is inspired by Sinatra and uses Connect as its middleware framework. Key features include routing, middleware support, template rendering with engines like Jade, and session handling with storage options. Errors can be handled via the app.error() method. Express provides a full-featured and easy to use web development framework for Node.js.
Arrow functions are a concise syntax introduced in ES6 that do not have bindings to 'this', 'arguments', 'super', or 'new.target'. They can be used in various contexts, support rest and default parameters, destructuring, and are suitable for callbacks in functions like map, filter, and promises. However, arrow functions cannot be used as constructors and do not have a local 'arguments' value.
Le document présente un cours sur le développement Android, basé sur le livre de Jean-François Lalande, couvrant des sujets tels que le SDK Android, la création d'interfaces graphiques, et la gestion des données. Il décrit la structuration des applications Android, les composants essentiels comme les activités et les services, et fournit des exemples de code pour illustrer les concepts. Ce cours est proposé sous une licence Creative Commons, permettant sa diffusion et son utilisation non commerciale.
XSLT is used to transform XML documents into other formats like HTML. It uses two input files - the XML data file and an XSL stylesheet file containing templates that specify how to insert the XML data and transform it. The XSLT file uses elements like <xsl:value-of> to output node values and <xsl:for-each> to loop through nodes, and attributes like select to specify nodes to operate on. Templates in the XSLT file are matched to nodes using attributes like match to transform the XML into the desired output format.
The document discusses the use of Node.js with TypeScript, Jest, and NestJS, highlighting their flexibility, modularity, and robustness for application development. It covers the architecture of applications built with NestJS, including dependency injection, middleware, and testing methodologies, as well as advantages of using TypeScript and Jest for improved scalability and structure. Key aspects of application components, controllers, and exception handling are also outlined, emphasizing best practices for building resilient applications.
The document provides an overview of arrow functions in ES6, highlighting their syntax, advanced features, and differences from traditional function expressions. It explains that arrows are shorthand for function expressions and emphasizes their benefits, such as shorter syntax and non-binding of 'this'. Live examples illustrate practical applications of arrow functions and their capabilities.
Le document présente JavaServer Faces (JSF), un framework pour le développement d'applications web en Java, axé sur la productivité et la standardisation. Il détaille l'architecture, le cycle de vie des composants, ainsi que des exemples de code pour une application de gestion de produits utilisant Spring et JSF. Enfin, il inclut des dépendances Maven nécessaires pour la mise en œuvre du projet.
This document provides an introduction and overview of WebGL and Three.js. It discusses what WebGL and Three.js are, how to initialize Three.js, create meshes, add lighting and materials, load 3D models, use shaders, and communicate with shaders. The presentation includes code examples and demos to illustrate key concepts.
1) The document discusses 30 important interview questions about virtualization and VMware. It covers topics like the VMware kernel, ESX server networking, vMotion, snapshots, port groups, cloning templates, and more.
2) Each question is accompanied by an answer that provides details about the topic. For example, it explains that the VMware kernel is proprietary and works with the service console, while port groups separate network traffic types.
3) Common virtualization challenges and their solutions are also addressed, such as issues taking snapshots of VMs configured with physical LUN mappings that need to be changed to virtual first.
Node.js is a server-side JavaScript framework created by Ryan Dahl in 2009, utilizing Google's V8 engine for event-driven, non-blocking I/O, which facilitates scalable application development. The document discusses Node.js benefits, setup procedures, including installation methods like precompiled binaries and version managers, as well as basic commands for managing Node.js and npm (Node Package Manager), which comes bundled with Node.js. Key features highlighted include the ability to use the same language for both frontend and backend development and the ease of building real-time applications.
Le document présente différentes architectures de systèmes logiciels, notamment les architectures client/serveur, n-tiers et peer-to-peer (P2P), en expliquant leurs structures, avantages et inconvénients. Il aborde l'évolution de la technologie P2P, des logiciels comme Napster, Kazaa, eDonkey et BitTorrent, ainsi que les enjeux juridiques et culturels liés au partage de fichiers sur Internet. Enfin, le document examine le concept de grid computing pour une meilleure virtualisation des ressources informatiques.
Le document aborde la virtualisation en tant que technologie optimisant l'utilisation des ressources informatiques, réduisant les coûts, et améliorant la flexibilité et la sécurité des infrastructures. Il explore divers types de virtualisation, y compris la virtualisation complète, para-virtualisation et les isolateurs, ainsi que leurs applications dans les serveurs, le stockage et les réseaux. Les avantages incluent la réduction des coûts, la simplification de l'administration et l'amélioration de la qualité de service.
Express is a web framework for Node.js that allows routing, middleware, templating and more. It is inspired by Sinatra and uses Connect as its middleware framework. Key features include routing, middleware support, template rendering with engines like Jade, and session handling with storage options. Errors can be handled via the app.error() method. Express provides a full-featured and easy to use web development framework for Node.js.
Arrow functions are a concise syntax introduced in ES6 that do not have bindings to 'this', 'arguments', 'super', or 'new.target'. They can be used in various contexts, support rest and default parameters, destructuring, and are suitable for callbacks in functions like map, filter, and promises. However, arrow functions cannot be used as constructors and do not have a local 'arguments' value.
Le document présente un cours sur le développement Android, basé sur le livre de Jean-François Lalande, couvrant des sujets tels que le SDK Android, la création d'interfaces graphiques, et la gestion des données. Il décrit la structuration des applications Android, les composants essentiels comme les activités et les services, et fournit des exemples de code pour illustrer les concepts. Ce cours est proposé sous une licence Creative Commons, permettant sa diffusion et son utilisation non commerciale.
XSLT is used to transform XML documents into other formats like HTML. It uses two input files - the XML data file and an XSL stylesheet file containing templates that specify how to insert the XML data and transform it. The XSLT file uses elements like <xsl:value-of> to output node values and <xsl:for-each> to loop through nodes, and attributes like select to specify nodes to operate on. Templates in the XSLT file are matched to nodes using attributes like match to transform the XML into the desired output format.
The document discusses the use of Node.js with TypeScript, Jest, and NestJS, highlighting their flexibility, modularity, and robustness for application development. It covers the architecture of applications built with NestJS, including dependency injection, middleware, and testing methodologies, as well as advantages of using TypeScript and Jest for improved scalability and structure. Key aspects of application components, controllers, and exception handling are also outlined, emphasizing best practices for building resilient applications.
The document provides an overview of arrow functions in ES6, highlighting their syntax, advanced features, and differences from traditional function expressions. It explains that arrows are shorthand for function expressions and emphasizes their benefits, such as shorter syntax and non-binding of 'this'. Live examples illustrate practical applications of arrow functions and their capabilities.
Le document présente JavaServer Faces (JSF), un framework pour le développement d'applications web en Java, axé sur la productivité et la standardisation. Il détaille l'architecture, le cycle de vie des composants, ainsi que des exemples de code pour une application de gestion de produits utilisant Spring et JSF. Enfin, il inclut des dépendances Maven nécessaires pour la mise en œuvre du projet.
This document provides an introduction and overview of WebGL and Three.js. It discusses what WebGL and Three.js are, how to initialize Three.js, create meshes, add lighting and materials, load 3D models, use shaders, and communicate with shaders. The presentation includes code examples and demos to illustrate key concepts.
The document discusses various web technologies and standards, including JavaScript, HTML5 features, CSS properties, and browser compatibility issues. It highlights specific functionalities like typed arrays, indexing, and new API capabilities across different browsers, primarily focusing on Internet Explorer's evolution. Additionally, the document references several external links for more detailed information on these topics.
This document introduces Porky, a tool for test automation of JavaScript without coding tests. It demonstrates running a test by registering a function, running it, and checking the results without writing any test code. More information can be found at the provided GitHub link.
This document discusses hemostasis, bleeding disorders, and platelet disorders. It begins by explaining normal hemostasis and the mechanisms involved in maintaining a fluid blood state and forming clots at sites of injury. It then defines bleeding disorders as problems with blood clotting that result in abnormal bleeding. Common causes discussed include defects in blood vessels or blood itself, clotting factor deficiencies, platelet abnormalities, and liver disease. Finally, it examines several specific platelet disorders like thrombocytopenia, immune thrombocytopenic purpura, hemolytic uremic syndrome, thrombotic thrombocytopenic purpura, and those resulting from bone marrow infiltration or disseminated intravascular coagulation.
The document is a report from the OECD titled "Health at a Glance 2015" that provides data on key health indicators across OECD countries. It includes sections on health status, risk factors, health workforce, health spending, and quality of care. Some of the key findings summarized are: average life expectancy has increased over 10 years to over 80 years across OECD countries; obesity and smoking rates have also risen but are declining in some countries; healthcare spending has grown but pharmaceutical spending has been cut in many countries through increased generic drug use; and countries vary in terms of physician and nurse pay and the proportion that are foreign-trained.
Renaissance art and architecture differed from the medieval period in several key ways:
1. Renaissance art placed a stronger emphasis on realism, classical influence from Greco-Roman styles, and depicting human emotion and form over religious dogma.
2. Perspective techniques developed, allowing artists to create the illusion of 3D space on a 2D surface through techniques like linear perspective and proportion.
3. Individualism was expressed through techniques like portraiture that captured the subject's unique personality and likeness, rather than generic representations.
This document provides guidance on writing effective leads for news stories. It discusses the main types of leads, including conventional/summary leads that answer the five Ws and one H, grammatical beginning leads that use phrases or clauses, and novelty leads like astonisher, contrast, epigram, picture, and quotation leads designed to attract reader attention. Conventional leads can focus on who, what, where, when, why, or how. Grammatical beginning leads use prepositional, infinitive, participial, gerundial, or clause structures. The document provides examples to illustrate each lead type. The goal is to engage and inform readers with a concise introduction to the news story.
The document discusses tuning SQL queries in Oracle databases. It begins by noting that while tools can help, there is no single process for tuning every query as each case depends on factors like the schema design, data distribution and how the optimizer chooses a plan. The document then provides a methodology for investigating and tuning a query with poor performance, including getting the execution plan, checking it visually, and identifying possible causes like stale statistics, missing indexes or inefficient SQL.
The document provides advice on how to start a business by first being employed within yourself. It discusses Nigeria's high unemployment rate and need for more entrepreneurs. The author advocates having a unique idea or product, then taking the first steps to turn it into a business from your home by working on it and building your brand. While the journey will not be easy, choosing to try can lead to success, whereas not trying will guarantee failure. The document ends by noting the streets of Lagos contain opportunities for both gold and broken dreams, and it's up to each individual to choose their path.
Consumer Trends in 2016: 36 Expert Perspectives - Canvas8Canvas8
The document outlines consumer trends in 2016, based on insights from 36 experts across various sectors, highlighting significant shifts like the demand for authentic food experiences, the growing importance of personalized health and beauty products, and the impact of technology on consumer behavior. Key trends include a rise in guilt-free eating, lifestyle fitting products, unique leisure accommodations, and a focus on digital engagement in luxury and retail sectors. Additionally, themes of sustainability, community involvement, and the evolving role of technology in everyday life are emphasized throughout the analysis.
Breast cancer is the most common cancer in women. In 2008, there were 211,000 new cases and 40,500 deaths in the US. Risk factors include family history, personal history of breast disease, older age, early menarche or late first birth. Non-invasive cancers like DCIS have increased incidence and require surgery with or without radiation. Invasive cancers are staged and treated with surgery, radiation, and systemic therapies like chemotherapy and hormonal therapy based on tumor size, lymph node involvement, and biomarkers.
The document provides information on different types of intake structures used for collecting surface water. It discusses wet and dry intake towers, as well as submerged and exposed intakes. Trash racks are described as screens used to prevent debris from entering intake structures. Twin well river intake structures are also summarized, which typically include an inlet well, intake pipe, and jack well to lift water from the river to the treatment plant.
Leaving Flatland: Getting Started with WebGL- SXSW 2012philogb
This document discusses getting started with WebGL. It begins with an introduction to WebGL, explaining that it allows 3D graphics in browsers similarly to OpenGL. It then provides examples of what can be done with WebGL, such as data visualization, games, 3D modeling, and more. The document proceeds to explain the basic graphics pipeline and JavaScript API used in WebGL. It concludes by discussing how to set up a basic 3D scene and choose a WebGL library like Three.js or PhiloGL to get started creating WebGL applications.
This document discusses fluid, electrolyte, and acid-base balance. It begins by listing the objectives of describing fluid and electrolyte regulation, imbalance, major electrolytes, populations at risk, and related diagnostic tests and nursing responsibilities. It then covers topics like body fluid distribution, maintaining fluid balance, fluid volume excess and deficit, electrolyte regulation and imbalances, and acid-base regulation and imbalances. It discusses related nursing interventions like monitoring intake and output, weight, lab tests, and treating imbalances through oral or IV fluid replacement depending on the situation.
75. window.addEventListener("DOMContentLoaded", function(){
//描画領域の大きさに利用する
var width = window.innerWidth;
var height = window.innerHeight;
//レンダラーを設定
var renderer = new THREE.WebGLRenderer();
//レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
Saturday, September 8, 12
76. window.addEventListener("DOMContentLoaded", function(){
//描画領域の大きさに利用する
var width = window.innerWidth;
var height = window.innerHeight;
//レンダラーを設定
var renderer = new THREE.WebGLRenderer();
//レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
Saturday, September 8, 12
77. window.addEventListener("DOMContentLoaded", function(){
//描画領域の大きさに利用する
var width = window.innerWidth;
var height = window.innerHeight;
//レンダラーを設定
var renderer = new THREE.WebGLRenderer();
//レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
Saturday, September 8, 12
78. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
79. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
80. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
81. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
82. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
83. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
84. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
85. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
86. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
87. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
88. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
89. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
90. //レンダラーのサイズは当初設定したwidthとheightと同じに
renderer.setSize( width, height );
//HTMLのbody要素直下の子要素としてレンダラーを追加
document.body.appendChild( renderer.domElement );
//シーンを設定
var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
Saturday, September 8, 12
91. var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
Saturday, September 8, 12
92. var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
Saturday, September 8, 12
93. var scene = new THREE.Scene();
//カメラを設定
var fov = 80;
var aspect = width / height;
var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
Saturday, September 8, 12
94. var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
Saturday, September 8, 12
95. var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
Saturday, September 8, 12
96. var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
Saturday, September 8, 12
97. var near = 1;
var far = 1000;
var camera =
new THREE.PerspectiveCamera( fov, aspect, near, far );
//カメラの位置を手前に500移動
camera.position.z = 500;
//カメラをシーンに追加
scene.add( camera );
//光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
Saturday, September 8, 12
98. //光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
99. //光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
100. //光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
101. //光源を設定
var directionalLight =
new THREE.DirectionalLight( 0xffffff, 3 );
directionalLight.position.z = 3;
//光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
102. //光源をシーンに追加
scene.add( directionalLight );
//横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
103. //横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
104. //横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
105. //横幅、高さ、奥行きが200の立方体のジオメトリーを設定
var geometry = new THREE.CubeGeometry(200, 200, 200);
//マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
106. //マテリアルを設定
var material = new THREE.MeshLambertMaterial({color:
0x660000});
//メッシュを作成
var cubeMesh = new THREE.Mesh( geometry, material);
//メッシュをシーンに追加
scene.add( cubeMesh );
//レンダリング
renderer.render( scene, camera );
});
Saturday, September 8, 12
161. Let's see some results
• http://yomotsu.github.com/threejs-examples/
cannonjs_control/
• http://yomotsu.github.com/threejs-examples/
box2dwebjs_ragdoll/
Saturday, September 8, 12