add some docs
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = {
|
|||||||
'callback-return': 'error',
|
'callback-return': 'error',
|
||||||
'camelcase': 'error',
|
'camelcase': 'error',
|
||||||
'capitalized-comments': 'off',
|
'capitalized-comments': 'off',
|
||||||
'class-methods-use-this': 'error',
|
'class-methods-use-this': 'off',
|
||||||
'comma-dangle': 'error',
|
'comma-dangle': 'error',
|
||||||
'comma-spacing': [
|
'comma-spacing': [
|
||||||
'error',
|
'error',
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2011-2016 Bartek Szopka
|
Copyright (c) 2011-2016 Bartek Szopka, 2016-2024 Henrik Ingo, 2024 Janis Hutz
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* in modern browsers and inspired by the idea behind prezi.com.
|
* in modern browsers and inspired by the idea behind prezi.com.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2023 Henrik Ingo (@henrikingo), 2024 Janis Hutz
|
* Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2024 Henrik Ingo (@henrikingo), 2024 Janis Hutz
|
||||||
* and 70+ other contributors
|
* and 70+ other contributors
|
||||||
*
|
*
|
||||||
* Released under the MIT License.
|
* Released under the MIT License.
|
||||||
@@ -21,10 +21,50 @@
|
|||||||
// Welcome to the impress.js source code
|
// Welcome to the impress.js source code
|
||||||
// You are one of those who would like to know how impress.js works?
|
// You are one of those who would like to know how impress.js works?
|
||||||
// Let us show you!
|
// Let us show you!
|
||||||
|
// NOTE that compared to previous versions of impress, this code is documented in a more technical fashion.
|
||||||
|
|
||||||
function () {
|
// Important note on the file structure of impress.js, as it has changed with V3
|
||||||
"use strict";
|
// This file contains all the interface definitions and uses various components from the ./lib directory,
|
||||||
|
// as well as loading impress plugins from the ./plugins directory. A fully built impress.js version
|
||||||
|
// has all of these files combined into a single file, as to enable a simple include.
|
||||||
|
|
||||||
|
window.impress = () => {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// this function is used to initialize impress. It calls various private functions that initialize
|
||||||
|
// various components
|
||||||
var init = () => {
|
var init = () => {
|
||||||
console.log( 'impress-init' );
|
console.log( 'init' );
|
||||||
|
};
|
||||||
|
|
||||||
|
// This function can be used to add new elements to the impress 3D-API
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to create a new element on the virtual canvas of impress.js
|
||||||
|
* It is used for example by the "presentation" plugin, which parses the presentation
|
||||||
|
* and initializes impress itself. You can also use this function to edit a previously
|
||||||
|
* generated element. This allows for example the Overview plugin to work as it does.
|
||||||
|
*
|
||||||
|
* Returns true if successful at positioning this element, false, if failed
|
||||||
|
* @param {string} DOMElementID
|
||||||
|
* @param {object} coordinates
|
||||||
|
* @param {object} rotation
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
var addElement = ( DOMElementID, coordinates, rotation ) => {
|
||||||
|
console.log( 'element added' );
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description
|
||||||
|
* @param {any} DOMElementID
|
||||||
|
* @return {any}
|
||||||
|
*/
|
||||||
|
var removeElement = ( DOMElementID ) => {
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
init
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -13,19 +13,15 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
</head>
|
||||||
<body class="impress-not-supported">
|
<body class="impress-not-supported">
|
||||||
<div class="fallback-message">
|
|
||||||
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
|
|
||||||
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
|
|
||||||
</div>
|
|
||||||
<div id="impress" data-width="1920" data-height="1080">
|
<div id="impress" data-width="1920" data-height="1080">
|
||||||
<div id="title" class="step">
|
<div id="title" class="step">
|
||||||
<h1>Test</h1>
|
<h1>Test</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="./impress.js"></script><script>impress().init()</script>
|
<script src="./impress.js"></script>
|
||||||
|
<script>impress().init()</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user